nodejs22.x/hello-gql/{{cookiecutter.project_name}}/gql/greet.js (10 lines of code) (raw):
export function request(ctx) {
const { source, args } = ctx;
return {
operation: "Invoke",
payload: { field: ctx.info.fieldName, arguments: args, source },
};
}
export function response(ctx) {
return ctx.result;
}